package com.hskn.hss.module.carviolation.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CarViolationCharts implements Serializable {

    private static final long serialVersionUID = 1L;
    private String depId;
    private String depName;
    private String carId;
    private String carName;
    private String time;
    private Integer allCount;
    /**
     * 车辆停留
     */
    private Integer cltlCount = 0;
    /**
     * 车辆空驶
     */
    private Integer clksCount = 0;
    /**
     * 速度限制
     */
    private Integer sdxzCount = 0;


    public CarViolationCharts() {

    }

    public List<Object> getResList(){
        List<Object> resList=new ArrayList<>();
        if (allCount!=null) {
            resList.add(allCount);
        }else {
            resList.add(0);
        }
        if (cltlCount!=null) {
            resList.add(cltlCount);
        }else {
            resList.add(0);
        }
        if (clksCount!=null) {
            resList.add(clksCount);
        }else {
            resList.add(0);
        }
        if (sdxzCount!=null) {
            resList.add(sdxzCount);
        }else {
            resList.add(0);
        }
        return resList;
    }
}
